import QtQuick 2.0
import QtQuick.Dialogs 1.3
import PluginHandler 1.0
import FileDialogHandler 1.0

Item {
    FileDialog {
        id: fileDialog
        title: "Please choose a file"
        folder: shortcuts.desktop
        visible: true

        onAccepted: {
            console.log("You chose: " + fileDialog.fileUrl)
            PluginHandler.addNewPlugin(fileDialog.fileUrl)
        }
        onRejected: {
            console.log("Canceled")
            FileDialogHandler.cancleFileDialogPage();
        }
    }
}
